<#assign pojo=oneToManyPojo.getOne()>
<#assign many=oneToManyPojo.getMany()>
<#assign ones=oneToManyPojo.getOnes()>
<#assign fields=pojo.getFilterdPojoFields()>
<#assign declarationName = pojo.importType(pojo.getDeclarationName())>
<#assign declarationNameFirstLetterLower = pojo.importType(pojo.getDeclarationNameFirstLetterLower())>
<#assign realPackageAndClassPath = "${pojo.getRealPackageAndClassPath()}">
<#assign masterid = pojo.getDeclarationNameFirstLetterLower()+"Id">
<div *ngIf="visible">
  <form nz-form [formGroup]="filterForm" class="ant-advanced-search-form">
    <div nz-row [nzGutter]="40">
      <div nz-col [nzSpan]="16">
        <div nz-form-item nz-row>
          <div nz-form-label nz-col [nzSpan]="5">
            <label [attr.for]="keys">关键字</label>
          </div>
          <div nz-form-control nz-col [nzSpan]="19">
            <nz-input [nzSize]="large" [nzPlaceHolder]="placeholder" formControlName="keys" [nzId]="keys"></nz-input>
          </div>
        </div>
      </div>
      <div nz-col [nzSpan]="8" style="text-align: right;">
        <!--<button nz-button [nzType]="'primary'" (click)="flushData()">Search</button>-->
        <button nz-button [nzType]="'primary'" (click)="onSearch.emit({params:getParams()})">search</button>
        <button nz-button (click)="resetFilterForm()">Clear</button>
        <a style="margin-left:8px;font-size:12px;" (click)="_toggleCollapse()">
          Collapse
          <i class="anticon" [class.anticon-down]="!isCollapse" [class.anticon-up]="isCollapse"></i>
        </a>
      </div>
    </div>
    <div nz-row [nzGutter]="40" *ngIf="isCollapse">
<#assign fields=pojo.getFilterdPojoFields()>
<#foreach field in fields>
<#if field.getIsSampleField()>
      <div nz-col [nzSpan]="8">
        <div nz-form-item nz-row>
          <div nz-form-label nz-col [nzSpan]="5">
            <label [attr.for]="${field.getName()}"><#if field.getComment()?exists>${field.getComment()}<#else>${field.getName()}</#if></label>
          </div>
          <div nz-form-control nz-col [nzSpan]="19">
            <nz-input formControlName="${field.getName()}" [nzPlaceHolder]="'请输入<#if field.getComment()?exists>${field.getComment()}<#else>${field.getName()}</#if>'"></nz-input>
          </div>
        </div>
      </div>
</#if>
</#foreach>
    </div>
  </form>
</div>
